//    Copyright (C) 2013  <lugocreation@gmail.com>
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
package org.jpgolay.me.supplier;

import java.awt.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.*;
import org.jpgolay.gui.fixed.*;
import org.jpgolay.gui.iconBar.IconBar;
import org.jpgolay.me.util.MEUtility;

public class SupplierGUI extends JInternalFrame {

    public SupplierGUI() {
        jContentPane = null;
        basicMenu = null;
        iconBar = null;
        mainPanel = null;
        supplierSearch = null;
        jTabbedPane = null;
        addressPanel = null;
        infosPanel = null;
        jTabbedPane1 = null;
        salesAddressPanel = null;
        shippingAddressPanel = null;
        companyPanel = null;
        companyLabelAndTextField = null;
        statusLabelAndComboBox = null;
        salesAddrLn1abelAndTextField = null;
        salesAddrLn2abelAndTextField = null;
        salesCityLabelAndTextField = null;
        salesCountryLabelAndTextField = null;
        salesZipLabelAndTextField = null;
        contactPanel = null;
        contactLabelAndTextField = null;
        jobContactLabelAndTextField = null;
        telLabelAndTextField = null;
        faxLabelAndTextField = null;
        shippingAddrLn1LabelAndTextField = null;
        shippingAddrLn2LabelAndTextField = null;
        shippingCityLabelAndTextField = null;
        shippingZipLabelAndTextField = null;
        shippingCountryLabelAndTextField = null;
        glnLabelAndTextField = null;
        emailLabelAndTextField = null;
        webLabelAndTextField = null;
        tel2LabelAndTextField = null;
        familyLabelAndComboBox = null;
        bankNumberLabelAndTextField = null;
        lastUserLabelAndTextField = null;
        lastTimeLabelAndTextField = null;
        idLabelAndTextField = null;
        jScrollPane = null;
        notesJTextArea = null;
        jScrollPane1 = null;
        initialize();
    }

    private void initialize() {
        setJMenuBar(getBasicMenu());
        setFrameIcon(new ImageIcon(getClass().getResource("/org/jpgolay/me/images/supplierList16x16.png")));
        setTitle("FOURNISSEUR");
        setSize(340, 482);
        setContentPane(getJContentPane());
    }

    private JPanel getJContentPane() {
        if (jContentPane == null) {
            jContentPane = new JPanel();
            jContentPane.setLayout(new BorderLayout());
            jContentPane.add(getIconBar(), "North");
            jContentPane.add(getMainPanel(), "Center");
        }
        return jContentPane;
    }

    private BasicMenu getBasicMenu() {
        if (basicMenu == null) {
            basicMenu = new BasicMenu();
        }
        return basicMenu;
    }

    private IconBar getIconBar() {
        if (iconBar == null) {
            iconBar = new IconBar();
        }
        return iconBar;
    }

    private JPanel getMainPanel() {
        if (mainPanel == null) {
            mainPanel = new JPanel();
            mainPanel.setLayout(new BorderLayout());
            mainPanel.add(getSupplierSearch(), "North");
            mainPanel.add(getJScrollPane1(), "Center");
        }
        return mainPanel;
    }

    private SearchBox getSupplierSearch() {
        if (supplierSearch == null) {
            supplierSearch = new SearchBox();
            supplierSearch.setPreferredSize(supplierSearch.getSize());
            supplierSearch.addPropertyChangeListener("icon", new PropertyChangeListener() {
                public void propertyChange(PropertyChangeEvent e) {
                    supplierSearch.setPreferredSize(supplierSearch.getSize());
                    getMainPanel().revalidate();
                }
            });
        }
        return supplierSearch;
    }

    private JTabbedPane getJTabbedPane() {
        if (jTabbedPane == null) {
            jTabbedPane = new JTabbedPane();
            jTabbedPane.setPreferredSize(new Dimension(306, 380));
            jTabbedPane.addTab("Coordonn\351es", null, getAddressPanel(), null);
            jTabbedPane.addTab("Infos", null, getInfosPanel(), null);
        }
        return jTabbedPane;
    }

    private JPanel getAddressPanel() {
        if (addressPanel == null) {
            addressPanel = new JPanel();
            addressPanel.setLayout(new BorderLayout());
            addressPanel.add(getCompanyPanel(), "North");
            addressPanel.add(getJTabbedPane1(), "Center");
            addressPanel.add(getContactPanel(), "South");
        }
        return addressPanel;
    }

    private JPanel getInfosPanel() {
        if (infosPanel == null) {
            FlowLayout flowLayout6 = new FlowLayout();
            infosPanel = new JPanel();
            infosPanel.setLayout(flowLayout6);
            flowLayout6.setVgap(2);
            infosPanel.add(getIdLabelAndTextField(), null);
            infosPanel.add(getFamilyLabelAndComboBox(), null);
            infosPanel.add(getGlnLabelAndTextField(), null);
            infosPanel.add(getBankNumberLabelAndTextField(), null);
            infosPanel.add(getTel2LabelAndTextField(), null);
            infosPanel.add(getEmailLabelAndTextField(), null);
            infosPanel.add(getWebLabelAndTextField(), null);
            infosPanel.add(getJScrollPane(), null);
            infosPanel.add(getLastTimeLabelAndTextField(), null);
            infosPanel.add(getLastUserLabelAndTextField(), null);
        }
        return infosPanel;
    }

    private JTabbedPane getJTabbedPane1() {
        if (jTabbedPane1 == null) {
            jTabbedPane1 = new JTabbedPane();
            jTabbedPane1.addTab("Adresse commercial", null, getSalesAddressPanel(), null);
            jTabbedPane1.addTab("Adresse d'enl\350vement", null, getShippingAddressPanel(), null);
        }
        return jTabbedPane1;
    }

    private JPanel getSalesAddressPanel() {
        if (salesAddressPanel == null) {
            FlowLayout flowLayout3 = new FlowLayout();
            salesAddressPanel = new JPanel();
            salesAddressPanel.setLayout(flowLayout3);
            flowLayout3.setVgap(2);
            salesAddressPanel.add(getSalesAddrLn1abelAndTextField(), null);
            salesAddressPanel.add(getSalesAddrLn2abelAndTextField(), null);
            salesAddressPanel.add(getSalesCityLabelAndTextField(), null);
            salesAddressPanel.add(getSalesZipLabelAndTextField(), null);
            salesAddressPanel.add(getSalesCountryLabelAndTextField(), null);
        }
        return salesAddressPanel;
    }

    private JPanel getShippingAddressPanel() {
        if (shippingAddressPanel == null) {
            FlowLayout flowLayout2 = new FlowLayout();
            shippingAddressPanel = new JPanel();
            shippingAddressPanel.setLayout(flowLayout2);
            flowLayout2.setVgap(2);
            shippingAddressPanel.add(getShippingAddrLn1LabelAndTextField(), null);
            shippingAddressPanel.add(getShippingAddrLn2LabelAndTextField(), null);
            shippingAddressPanel.add(getShippingCityLabelAndTextField(), null);
            shippingAddressPanel.add(getShippingZipLabelAndTextField(), null);
            shippingAddressPanel.add(getShippingCountryLabelAndTextField(), null);
        }
        return shippingAddressPanel;
    }

    private JPanel getCompanyPanel() {
        if (companyPanel == null) {
            FlowLayout flowLayout1 = new FlowLayout();
            companyPanel = new JPanel();
            companyPanel.setLayout(flowLayout1);
            flowLayout1.setVgap(2);
            companyPanel.setPreferredSize(new Dimension(627, 60));
            companyPanel.add(getCompanyLabelAndTextField(), null);
            companyPanel.add(getStatusLabelAndComboBox(), null);
        }
        return companyPanel;
    }

    private LabelAndTextField getCompanyLabelAndTextField() {
        if (companyLabelAndTextField == null) {
            companyLabelAndTextField = new LabelAndTextField();
            companyLabelAndTextField.setLabel("Raison social");
        }
        return companyLabelAndTextField;
    }

    private LabelAndComboBox getStatusLabelAndComboBox() {
        if (statusLabelAndComboBox == null) {
            statusLabelAndComboBox = new LabelAndComboBox();
            statusLabelAndComboBox.setLabel("Civilit\351");
            statusLabelAndComboBox.setList(MEUtility.STATUS);
        }
        return statusLabelAndComboBox;
    }

    private LabelAndTextField getSalesAddrLn1abelAndTextField() {
        if (salesAddrLn1abelAndTextField == null) {
            salesAddrLn1abelAndTextField = new LabelAndTextField();
            salesAddrLn1abelAndTextField.setLabel("Adresse");
        }
        return salesAddrLn1abelAndTextField;
    }

    private LabelAndTextField getSalesAddrLn2abelAndTextField() {
        if (salesAddrLn2abelAndTextField == null) {
            salesAddrLn2abelAndTextField = new LabelAndTextField();
            salesAddrLn2abelAndTextField.setLabel(" ");
        }
        return salesAddrLn2abelAndTextField;
    }

    private LabelAndTextField getSalesCityLabelAndTextField() {
        if (salesCityLabelAndTextField == null) {
            salesCityLabelAndTextField = new LabelAndTextField();
            salesCityLabelAndTextField.setLabel("Ville");
        }
        return salesCityLabelAndTextField;
    }

    private LabelAndTextField getSalesCountryLabelAndTextField() {
        if (salesCountryLabelAndTextField == null) {
            salesCountryLabelAndTextField = new LabelAndTextField();
            salesCountryLabelAndTextField.setLabel("Pays");
        }
        return salesCountryLabelAndTextField;
    }

    private LabelAndTextField getSalesZipLabelAndTextField() {
        if (salesZipLabelAndTextField == null) {
            salesZipLabelAndTextField = new LabelAndTextField();
            salesZipLabelAndTextField.setLabel("Code postal");
        }
        return salesZipLabelAndTextField;
    }

    private JPanel getContactPanel() {
        if (contactPanel == null) {
            FlowLayout flowLayout4 = new FlowLayout();
            contactPanel = new JPanel();
            contactPanel.setLayout(flowLayout4);
            contactPanel.setPreferredSize(new Dimension(330, 118));
            flowLayout4.setVgap(2);
            contactPanel.add(getContactLabelAndTextField(), null);
            contactPanel.add(getJobContactLabelAndTextField(), null);
            contactPanel.add(getTelLabelAndTextField(), null);
            contactPanel.add(getFaxLabelAndTextField(), null);
        }
        return contactPanel;
    }

    private LabelAndTextField getContactLabelAndTextField() {
        if (contactLabelAndTextField == null) {
            contactLabelAndTextField = new LabelAndTextField();
            contactLabelAndTextField.setLabel("Contact");
        }
        return contactLabelAndTextField;
    }

    private LabelAndTextField getJobContactLabelAndTextField() {
        if (jobContactLabelAndTextField == null) {
            jobContactLabelAndTextField = new LabelAndTextField();
            jobContactLabelAndTextField.setLabel("Fonction (Contact)");
        }
        return jobContactLabelAndTextField;
    }

    private LabelAndTextField getTelLabelAndTextField() {
        if (telLabelAndTextField == null) {
            telLabelAndTextField = new LabelAndTextField();
            telLabelAndTextField.setLabel("T\351l");
        }
        return telLabelAndTextField;
    }

    private LabelAndTextField getFaxLabelAndTextField() {
        if (faxLabelAndTextField == null) {
            faxLabelAndTextField = new LabelAndTextField();
            faxLabelAndTextField.setLabel("Fax");
        }
        return faxLabelAndTextField;
    }

    private LabelAndTextField getShippingAddrLn1LabelAndTextField() {
        if (shippingAddrLn1LabelAndTextField == null) {
            shippingAddrLn1LabelAndTextField = new LabelAndTextField();
            shippingAddrLn1LabelAndTextField.setLabel("Adresse");
        }
        return shippingAddrLn1LabelAndTextField;
    }

    private LabelAndTextField getShippingAddrLn2LabelAndTextField() {
        if (shippingAddrLn2LabelAndTextField == null) {
            shippingAddrLn2LabelAndTextField = new LabelAndTextField();
            shippingAddrLn2LabelAndTextField.setLabel(" ");
        }
        return shippingAddrLn2LabelAndTextField;
    }

    private LabelAndTextField getShippingCityLabelAndTextField() {
        if (shippingCityLabelAndTextField == null) {
            shippingCityLabelAndTextField = new LabelAndTextField();
            shippingCityLabelAndTextField.setLabel("Ville");
        }
        return shippingCityLabelAndTextField;
    }

    private LabelAndTextField getShippingZipLabelAndTextField() {
        if (shippingZipLabelAndTextField == null) {
            shippingZipLabelAndTextField = new LabelAndTextField();
            shippingZipLabelAndTextField.setLabel("Code postal");
        }
        return shippingZipLabelAndTextField;
    }

    private LabelAndTextField getShippingCountryLabelAndTextField() {
        if (shippingCountryLabelAndTextField == null) {
            shippingCountryLabelAndTextField = new LabelAndTextField();
            shippingCountryLabelAndTextField.setLabel("Pays");
        }
        return shippingCountryLabelAndTextField;
    }

    private LabelAndTextField getGlnLabelAndTextField() {
        if (glnLabelAndTextField == null) {
            FlowLayout flowLayout5 = new FlowLayout();
            glnLabelAndTextField = new LabelAndTextField();
            glnLabelAndTextField.setLayout(flowLayout5);
            glnLabelAndTextField.setLabel("GLN");
            glnLabelAndTextField.setPreferredSize(new Dimension(306, 31));
            flowLayout5.setVgap(2);
        }
        return glnLabelAndTextField;
    }

    private LabelAndTextField getEmailLabelAndTextField() {
        if (emailLabelAndTextField == null) {
            emailLabelAndTextField = new LabelAndTextField();
            emailLabelAndTextField.setLabel("Email");
        }
        return emailLabelAndTextField;
    }

    private LabelAndTextField getWebLabelAndTextField() {
        if (webLabelAndTextField == null) {
            webLabelAndTextField = new LabelAndTextField();
            webLabelAndTextField.setLabel("Site web");
        }
        return webLabelAndTextField;
    }

    private LabelAndTextField getTel2LabelAndTextField() {
        if (tel2LabelAndTextField == null) {
            tel2LabelAndTextField = new LabelAndTextField();
            tel2LabelAndTextField.setLabel("T\351l 2");
        }
        return tel2LabelAndTextField;
    }

    private LabelAndComboBox getFamilyLabelAndComboBox() {
        if (familyLabelAndComboBox == null) {
            familyLabelAndComboBox = new LabelAndComboBox();
            familyLabelAndComboBox.setLabel("Famille");
        }
        return familyLabelAndComboBox;
    }

    private LabelAndTextField getBankNumberLabelAndTextField() {
        if (bankNumberLabelAndTextField == null) {
            bankNumberLabelAndTextField = new LabelAndTextField();
            bankNumberLabelAndTextField.setLabel("N\260 de compte");
        }
        return bankNumberLabelAndTextField;
    }

    private LabelAndTextField getLastUserLabelAndTextField() {
        if (lastUserLabelAndTextField == null) {
            lastUserLabelAndTextField = new LabelAndTextField();
            lastUserLabelAndTextField.setLabel("Modifi\351 par");
            lastUserLabelAndTextField.getTextField().setEditable(false);
        }
        return lastUserLabelAndTextField;
    }

    private LabelAndTextField getLastTimeLabelAndTextField() {
        if (lastTimeLabelAndTextField == null) {
            lastTimeLabelAndTextField = new LabelAndTextField();
            lastTimeLabelAndTextField.setLabel("Derni\350re modification");
            lastTimeLabelAndTextField.getTextField().setEditable(false);
        }
        return lastTimeLabelAndTextField;
    }

    private LabelAndTextField getIdLabelAndTextField() {
        if (idLabelAndTextField == null) {
            idLabelAndTextField = new LabelAndTextField();
            idLabelAndTextField.setLabel("Code");
        }
        return idLabelAndTextField;
    }

    private JScrollPane getJScrollPane() {
        if (jScrollPane == null) {
            jScrollPane = new JScrollPane();
            jScrollPane.setViewportView(getNotesJTextArea());
        }
        return jScrollPane;
    }

    private JTextArea getNotesJTextArea() {
        if (notesJTextArea == null) {
            notesJTextArea = new JTextArea();
            notesJTextArea.setRows(5);
            notesJTextArea.setWrapStyleWord(true);
            notesJTextArea.setLineWrap(true);
            notesJTextArea.setPreferredSize(new Dimension(290, 150));
            notesJTextArea.setToolTipText("Commentaires");
        }
        return notesJTextArea;
    }

    public SearchBox getSupplierSearchBox() {
        return getSupplierSearch();
    }

    public BasicMenu getMenuPanel() {
        return getBasicMenu();
    }

    public IconBar getIconBarPanel() {
        return getIconBar();
    }

    public String getCompanyValue() {
        return getCompanyLabelAndTextField().getVal();
    }

    public void setCompanyValue(String txt) {
        getCompanyLabelAndTextField().setVal(txt);
    }

    public String getStatusValue() {
        return getStatusLabelAndComboBox().getSelectedString();
    }

    public void setStatusValue(String txt) {
        getStatusLabelAndComboBox().setSelectedString(txt);
    }

    public String getSalesAddrLn1Value() {
        return getSalesAddrLn1abelAndTextField().getVal();
    }

    public void setSalesAddrLn1Value(String txt) {
        getSalesAddrLn1abelAndTextField().setVal(txt);
    }

    public String getSalesAddrLn2Value() {
        return getSalesAddrLn2abelAndTextField().getVal();
    }

    public void setSalesAddrLn2Value(String txt) {
        getSalesAddrLn2abelAndTextField().setVal(txt);
    }

    public String getSalesCityValue() {
        return getSalesCityLabelAndTextField().getVal();
    }

    public void setSalesCityValue(String txt) {
        getSalesCityLabelAndTextField().setVal(txt);
    }

    public String getSalesCountryValue() {
        return getSalesCountryLabelAndTextField().getVal();
    }

    public void setSalesCountryValue(String txt) {
        getSalesCountryLabelAndTextField().setVal(txt);
    }

    public String getSalesZipValue() {
        return getSalesZipLabelAndTextField().getVal();
    }

    public void setSalesZipValue(String txt) {
        getSalesZipLabelAndTextField().setVal(txt);
    }

    public String getContactValue() {
        return getContactLabelAndTextField().getVal();
    }

    public void setContactValue(String txt) {
        getContactLabelAndTextField().setVal(txt);
    }

    public String getJobContactValue() {
        return getJobContactLabelAndTextField().getVal();
    }

    public void setJobContactValue(String txt) {
        getJobContactLabelAndTextField().setVal(txt);
    }

    public String getTelValue() {
        return getTelLabelAndTextField().getVal();
    }

    public void setTelValue(String txt) {
        getTelLabelAndTextField().setVal(txt);
    }

    public String getFaxValue() {
        return getFaxLabelAndTextField().getVal();
    }

    public void setFaxValue(String txt) {
        getFaxLabelAndTextField().setVal(txt);
    }

    public String getShippingAddrLn1Value() {
        return getShippingAddrLn1LabelAndTextField().getVal();
    }

    public void setShippingAddrLn1Value(String txt) {
        getShippingAddrLn1LabelAndTextField().setVal(txt);
    }

    public String getShippingAddrLn2Value() {
        return getShippingAddrLn2LabelAndTextField().getVal();
    }

    public void setShippingAddrLn2Value(String txt) {
        getShippingAddrLn2LabelAndTextField().setVal(txt);
    }

    public String getShippingCityValue() {
        return getShippingCityLabelAndTextField().getVal();
    }

    public void setShippingCityValue(String txt) {
        getShippingCityLabelAndTextField().setVal(txt);
    }

    public String getShippingZipValue() {
        return getShippingZipLabelAndTextField().getVal();
    }

    public void setShippingZipValue(String txt) {
        getShippingZipLabelAndTextField().setVal(txt);
    }

    public String getShippingCountryValue() {
        return getShippingCountryLabelAndTextField().getVal();
    }

    public void setShippingCountryValue(String txt) {
        getShippingCountryLabelAndTextField().setVal(txt);
    }

    public String getGlnValue() {
        return getGlnLabelAndTextField().getVal();
    }

    public void setGlnValue(String txt) {
        getGlnLabelAndTextField().setVal(txt);
    }

    public String getEmailValue() {
        return getEmailLabelAndTextField().getVal();
    }

    public void setEmailValue(String txt) {
        getEmailLabelAndTextField().setVal(txt);
    }

    public String getWebValue() {
        return getWebLabelAndTextField().getVal();
    }

    public void setWebValue(String txt) {
        getWebLabelAndTextField().setVal(txt);
    }

    public String getTel2Value() {
        return getTel2LabelAndTextField().getVal();
    }

    public void setTel2Value(String txt) {
        getTel2LabelAndTextField().setVal(txt);
    }

    public String getFamilyValue() {
        return getFamilyLabelAndComboBox().getSelectedString();
    }

    public void setFamilyValue(String txt) {
        getFamilyLabelAndComboBox().setSelectedString(txt);
    }

    public void setFamilyIndex(int index) {
        getFamilyLabelAndComboBox().setSelectedIndex(index);
    }

    public void setFamilyList(String list[]) {
        getFamilyLabelAndComboBox().setList(list);
    }

    public JComboBox getFamilyComboBox() {
        return getFamilyLabelAndComboBox().getComboBox();
    }

    public String getBankNumberValue() {
        return getBankNumberLabelAndTextField().getVal();
    }

    public void setBankNumberValue(String txt) {
        getBankNumberLabelAndTextField().setVal(txt);
    }

    public String getLastUserValue() {
        return getLastUserLabelAndTextField().getVal();
    }

    public void setLastUserValue(String txt) {
        getLastUserLabelAndTextField().setVal(txt);
    }

    public String getLastTimeValue() {
        return getLastTimeLabelAndTextField().getVal();
    }

    public void setLastTimeValue(String txt) {
        getLastTimeLabelAndTextField().setVal(txt);
    }

    public String getIdValue() {
        return getIdLabelAndTextField().getVal();
    }

    public void setIdValue(String txt) {
        getIdLabelAndTextField().setVal(txt);
    }

    public String getNotesValue() {
        return getNotesJTextArea().getText();
    }

    public void setNotesValue(String txt) {
        getNotesJTextArea().setText(txt);
    }

    public void cleanField() {
        setCompanyValue("");
        setStatusValue("");
        setSalesAddrLn1Value("");
        setSalesAddrLn2Value("");
        setSalesCityValue("");
        setSalesCountryValue("");
        setSalesZipValue("");
        setContactValue("");
        setJobContactValue("");
        setTelValue("");
        setFaxValue("");
        setShippingAddrLn1Value("");
        setShippingAddrLn2Value("");
        setShippingCityValue("");
        setShippingZipValue("");
        setShippingCountryValue("");
        setGlnValue("");
        setEmailValue("");
        setWebValue("");
        setTel2Value("");
        setFamilyValue("");
        setBankNumberValue("");
        setLastUserValue("");
        setLastTimeValue("");
        setIdValue("");
        setNotesValue("");
        setTitle("FOURNISSEUR");
    }

    public void setEnabledField(boolean b) {
        getCompanyLabelAndTextField().getTextField().setEditable(b);
        getStatusLabelAndComboBox().getComboBox().setEnabled(b);
        getSalesAddrLn1abelAndTextField().getTextField().setEditable(b);
        getSalesAddrLn2abelAndTextField().getTextField().setEditable(b);
        getSalesCityLabelAndTextField().getTextField().setEditable(b);
        getSalesCountryLabelAndTextField().getTextField().setEditable(b);
        getSalesZipLabelAndTextField().getTextField().setEditable(b);
        getContactLabelAndTextField().getTextField().setEditable(b);
        getJobContactLabelAndTextField().getTextField().setEditable(b);
        getTelLabelAndTextField().getTextField().setEditable(b);
        getFaxLabelAndTextField().getTextField().setEditable(b);
        getShippingAddrLn1LabelAndTextField().getTextField().setEditable(b);
        getShippingAddrLn2LabelAndTextField().getTextField().setEditable(b);
        getShippingCityLabelAndTextField().getTextField().setEditable(b);
        getShippingZipLabelAndTextField().getTextField().setEditable(b);
        getShippingCountryLabelAndTextField().getTextField().setEditable(b);
        getGlnLabelAndTextField().getTextField().setEditable(b);
        getEmailLabelAndTextField().getTextField().setEditable(b);
        getWebLabelAndTextField().getTextField().setEditable(b);
        getTel2LabelAndTextField().getTextField().setEditable(b);
        getFamilyLabelAndComboBox().getComboBox().setEnabled(b);
        getBankNumberLabelAndTextField().getTextField().setEditable(b);
        getIdLabelAndTextField().getTextField().setEditable(b);
        getNotesJTextArea().setEditable(b);
    }

    private JScrollPane getJScrollPane1() {
        if (jScrollPane1 == null) {
            jScrollPane1 = new JScrollPane();
            jScrollPane1.setViewportView(getJTabbedPane());
            jScrollPane1.setPreferredSize(new Dimension(306, 400));
            jScrollPane1.setHorizontalScrollBarPolicy(31);
        }
        return jScrollPane1;
    }
    private JPanel jContentPane;
    private BasicMenu basicMenu;
    private IconBar iconBar;
    private JPanel mainPanel;
    private SearchBox supplierSearch;
    private JTabbedPane jTabbedPane;
    private JPanel addressPanel;
    private JPanel infosPanel;
    private JTabbedPane jTabbedPane1;
    private JPanel salesAddressPanel;
    private JPanel shippingAddressPanel;
    private JPanel companyPanel;
    private LabelAndTextField companyLabelAndTextField;
    private LabelAndComboBox statusLabelAndComboBox;
    private LabelAndTextField salesAddrLn1abelAndTextField;
    private LabelAndTextField salesAddrLn2abelAndTextField;
    private LabelAndTextField salesCityLabelAndTextField;
    private LabelAndTextField salesCountryLabelAndTextField;
    private LabelAndTextField salesZipLabelAndTextField;
    private JPanel contactPanel;
    private LabelAndTextField contactLabelAndTextField;
    private LabelAndTextField jobContactLabelAndTextField;
    private LabelAndTextField telLabelAndTextField;
    private LabelAndTextField faxLabelAndTextField;
    private LabelAndTextField shippingAddrLn1LabelAndTextField;
    private LabelAndTextField shippingAddrLn2LabelAndTextField;
    private LabelAndTextField shippingCityLabelAndTextField;
    private LabelAndTextField shippingZipLabelAndTextField;
    private LabelAndTextField shippingCountryLabelAndTextField;
    private LabelAndTextField glnLabelAndTextField;
    private LabelAndTextField emailLabelAndTextField;
    private LabelAndTextField webLabelAndTextField;
    private LabelAndTextField tel2LabelAndTextField;
    private LabelAndComboBox familyLabelAndComboBox;
    private LabelAndTextField bankNumberLabelAndTextField;
    private LabelAndTextField lastUserLabelAndTextField;
    private LabelAndTextField lastTimeLabelAndTextField;
    private LabelAndTextField idLabelAndTextField;
    private JScrollPane jScrollPane;
    private JTextArea notesJTextArea;
    private JScrollPane jScrollPane1;
}
